<template>
  <div>
    <!-- 最外层容器 -->
    <el-container>
      <!-- 上半部分：顶栏 -->
      <el-header class="layout-header">
        <h1>项目开发管理平台</h1>
      </el-header>
      <!-- 下半部分：容器 -->
      <el-container class="layout-body">
        <!-- 下半部分的左侧边栏 -->
        <el-aside class="layout-aside">
          <el-menu
              router
              :default-active="$router.currentRoute.path"
              class="el-menu-vertical-demo"
              background-color="#222c32"
              text-color="#fff"
              active-text-color="#fff">
            <!-- 首页 -->
            <el-menu-item index="/welcome">
              <i class="el-icon-s-home"></i>
              <span>首页</span>
            </el-menu-item>
            <!-- 临时页面 -->

            <!-- 项目管理 -->
            <el-submenu index="3">
              <template slot="title">
                <i class="el-icon-s-goods"></i>
                <span>项目管理</span>
              </template>
              <el-menu-item index="/projects/createProject">
                <i class="el-icon-circle-plus"></i>
                <span>创建项目</span>
              </el-menu-item>
              <el-menu-item index="/projects/getProjectList">
                <i class="el-icon-circle-plus"></i>
                <span>项目列表</span>
              </el-menu-item>
            </el-submenu>
            <!-- 知识库管理 -->
            <el-menu-item index="/knows">
              <i class="el-icon-circle-plus"></i>
              <span>知识库</span>
            </el-menu-item>
            <!-- 权限管理 -->
            <el-submenu index="7">
              <template slot="title">
                <i class="el-icon-s-check"></i>
                <span>组织管理</span>
              </template>
              <el-menu-item index="/sys-user/user/role">
                <template slot="title">
                  <i class="el-icon-s-tools"></i>
                  <span>增加权限</span>
                </template>
              </el-menu-item>
              <el-menu-item index="/sys-user/class/class">
                <i class="el-icon-s-home"></i>
                <span>班级管理</span>
              </el-menu-item>
              <el-menu-item index="/sys-user/class/team">
                <i class="el-icon-s-flag"></i>
                <span>项目分组</span>
              </el-menu-item>
            </el-submenu>

            <!-- bug管理 -->
            <el-submenu index="5">
              <template slot="title">
                <i class="el-icon-toilet-paper"></i>
                <span>bug管理</span>
              </template>
              <el-menu-item index="/bugs/add-new">
                <i class="el-icon-circle-plus"></i>
                <span>新增bug</span>
              </el-menu-item>
              <el-menu-item index="/bugs">
                <i class="el-icon-circle-plus"></i>
                <span>bug列表</span>
              </el-menu-item>

            </el-submenu>
            <!--动态 -->
            <el-menu-item index="/logs">
              <i class="el-icon-s-custom"></i>
              <span>日志管理</span>
            </el-menu-item>

            <el-divider style="margin: 0px;"></el-divider>
            <el-menu-item style="margin: 0px;" index="/projects/socketTest">消息
              <span class="el-message_text">
                <sup v-if="true" class="el-message_content is-fixed">{{ messageCount }}</sup>
                  </span>
            </el-menu-item>
          </el-menu>
        </el-aside>
        <!-- 下半部分的右侧主体部分 -->
        <el-main class="layout-main">
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
</script>

<style>
.layout-header {
  background: #1684b0;
}

.layout-header h1 {
  color: #fff;
  text-align: left;
  line-height: 60px;
}

.layout-body {
  position: absolute;
  top: 60px;
  bottom: 0;
  left: 0;
  right: 0;
}

.layout-aside {
  background: #222c32;
}

.layout-aside i {
  color: #fff !important;
}

.layout-main {
  width: 100%;
  position: absolute;
  top: 0px;
  bottom: 0;
  left: 300px;
  right: 0;
}

.el-menu-item.is-active {
  background: #2d3c4d !important;
}
</style>